﻿<UserControl
    x:Class="EPPlayer.SkillPlayButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:EPPlayer"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="200"
    d:DesignWidth="360">

    <Grid d:DataContext="{Binding Source={d:DesignInstance Type=local:DemoVA, IsDesignTimeCreatable=True}}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="60"/>
        </Grid.RowDefinitions>
        <StackPanel Background="{StaticResource EPRed}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"/>
        <StackPanel Background="{StaticResource EPWhite}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"/>
        <TextBlock Grid.Row="0" Grid.Column="0" Margin="5,-7,5,8" 
		           Text="{Binding name}" TextTrimming="WordEllipsis" TextWrapping="NoWrap"
		           Style="{StaticResource SubHeaderTextStyle}"/>
        <TextBlock Grid.Row="0" Grid.Column="1" Margin="5,0,5,8"
		           Text="{Binding cookedValue}" Style="{StaticResource ItemHeaderTextStyle}"/>
        <Button Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                x:Name="bRoll" Content="Roll" Click="bRoll_Click"
                FontSize="27" Foreground="Black" Background="{StaticResource EPWhite}"/>
        <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
              x:Name="grRollResult" Visibility="Collapsed">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" Margin="5,4,0,0" 
			           Text="Roll:" Style="{StaticResource ItemHeaderTextStyle}"
                       Foreground="Black"/>
            <TextBlock Grid.Row="0" Grid.Column="1" Margin="5,4,0,0"
			           x:Name="txRoll" Style="{StaticResource ItemHeaderTextStyle}"
                       Foreground="Black"/>
            <TextBlock Grid.Row="0" Grid.Column="2" Grid.RowSpan="2" Margin="10,-4,0,0" HorizontalAlignment="Center"
			           x:Name="txSuccess" FontSize="48" FontStyle="Normal"
                       Foreground="Black"/>
            <TextBlock Grid.Row="1" Grid.Column="0" Margin="5,-4,0,0"
			           Text="Margin:" Style="{StaticResource ItemHeaderTextStyle}"
                       Foreground="Black"/>
            <TextBlock Grid.Row="1" Grid.Column="1" Margin="5,-4,0,0" 
			           x:Name="txMargin" Style="{StaticResource ItemHeaderTextStyle}"
                       Foreground="Black"/>
        </Grid>
    </Grid>
</UserControl>
